A portable electronic device equipped with a camera capable of photographing (taking images of) various subjects such as a tablet computer and a smartphone has been widespread. Some cameras built in such electronic devices have, for example, a function of automatically adjusting a camera focus (autofocus function) to obtain a high contrast image.
The camera focus is generally adjusted to a part of the photography area, but not to the other parts, in a depth of field. In particular, this inclination is remarkable in macro photography (closeup). In capture photography, etc. of a document, an image having high sharpness (for example, an all-focused image where a focus is adjusted to an entire photography area) such that contents of the document can be recognized as a whole, can hardly be taken.